package com.mingda.weathermagiccenter.dto;

import java.io.Serializable;
import java.util.HashMap;
import java.util.Map;

/**
 * Created by austin on 2020-09-10.
 */

//封装理由:国家站
public class StationFcBean<T> implements Serializable   {

    public String stationKey;
    public float lat;
    public float lon;
    public float high;
    public String city;
    public String stationName;
    public String cnty;
    public String timeBase;
    public float pres;
    public float temp;
    public int validtime;
    public int validtime_max;
    public float humi;

    public float prec;
    public int win_dir;
    public float win_vel;
    public float cov_low;
    public float cov_all;
    public int wep;
    public String code;
    public long norainday;
    public String firelevel;
    public String ffid;
    private static final Map<Integer, String> WEP_MAP = new HashMap<>();

    static {
        WEP_MAP.put(1, "露");
        WEP_MAP.put(2, "霜");
        WEP_MAP.put(3, "结冰");
        WEP_MAP.put(4, "烟幕");
        WEP_MAP.put(5, "霾");
        WEP_MAP.put(6, "浮尘");
        WEP_MAP.put(7, "扬沙");
        WEP_MAP.put(8, "尘卷风");
        WEP_MAP.put(10, "轻雾");
        WEP_MAP.put(13, "闪电");
        WEP_MAP.put(14, "极光");
        WEP_MAP.put(15, "大风");
        WEP_MAP.put(16, "积雪");
        WEP_MAP.put(17, "雷暴");
        WEP_MAP.put(18, "飑");
        WEP_MAP.put(19, "龙卷");
        WEP_MAP.put(31, "沙尘暴");
        WEP_MAP.put(38, "吹雪");
        WEP_MAP.put(39, "雪暴");
        WEP_MAP.put(42, "雾");
        WEP_MAP.put(48, "雾凇");
        WEP_MAP.put(50, "毛毛雨");
        WEP_MAP.put(56, "雨凇");
        WEP_MAP.put(60, "雨");
        WEP_MAP.put(68, "雨夹雪");
        WEP_MAP.put(70, "雪");
        WEP_MAP.put(76, "冰针");
        WEP_MAP.put(77, "米雪");
        WEP_MAP.put(79, "冰粒");
        WEP_MAP.put(80, "阵雨");
        WEP_MAP.put(83, "阵性雨夹雪");
        WEP_MAP.put(85, "阵雪");
        WEP_MAP.put(87, "霰");
        WEP_MAP.put(89, "冰雹");
        WEP_MAP.put(90, "电线结冰");
    }

    public static String convertWEP_Now(int wepNow) {
        return WEP_MAP.getOrDefault(wepNow, "未观测");
    }

    // Instance method for convenience
    public String getWEP_NowDescription() {
        return convertWEP_Now(this.wep);
    }
    public String getStationKey() {
        return stationKey;
    }

    public void setStationKey(String stationKey) {
        this.stationKey = stationKey;
    }

    public float getLat() {
        return lat;
    }

    public void setLat(float lat) {
        this.lat = lat;
    }

    public float getLon() {
        return lon;
    }

    public void setLon(float lon) {
        this.lon = lon;
    }

    public float getHigh() {
        return high;
    }

    public void setHigh(float high) {
        this.high = high;
    }

    public String getCity() {
        return city;
    }

    public void setCity(String city) {
        this.city = city;
    }

    public String getStationName() {
        return stationName;
    }

    public void setStationName(String stationName) {
        this.stationName = stationName;
    }

    public String getCnty() {
        return cnty;
    }

    public void setCnty(String cnty) {
        this.cnty = cnty;
    }

    public String getTimeBase() {
        return timeBase;
    }

    public void setTimeBase(String timeBase) {
        this.timeBase = timeBase;
    }

    public float getPres() {
        return pres;
    }

    public void setPres(float pres) {
        this.pres = pres;
    }

    public float getTemp() {
        return temp;
    }

    public void setTemp(float temp) {
        this.temp = temp;
    }

    public int getValidtime() {
        return validtime;
    }

    public void setValidtime(int validtime) {
        this.validtime = validtime;
    }

    public int getValidtime_max() {
        return validtime_max;
    }

    public void setValidtime_max(int validtime_max) {
        this.validtime_max = validtime_max;
    }

    public float getHumi() {
        return humi;
    }

    public void setHumi(float humi) {
        this.humi = humi;
    }

    public float getPrec() {
        return prec;
    }

    public void setPrec(float prec) {
        this.prec = prec;
    }

    public int getWin_dir() {
        return win_dir;
    }

    public void setWin_dir(int win_dir) {
        this.win_dir = win_dir;
    }

    public float getWin_vel() {
        return win_vel;
    }

    public void setWin_vel(float win_vel) {
        this.win_vel = win_vel;
    }

    public float getCov_low() {
        return cov_low;
    }

    public void setCov_low(float cov_low) {
        this.cov_low = cov_low;
    }

    public float getCov_all() {
        return cov_all;
    }

    public void setCov_all(float cov_all) {
        this.cov_all = cov_all;
    }

    public int getWep() {
        return wep;
    }

    public void setWep(int wep) {
        this.wep = wep;
    }

    public String getCode() {
        return code;
    }

    public void setCode(String code) {
        this.code = code;
    }

    public long getNorainday() {
        return norainday;
    }

    public void setNorainday(long norainday) {
        this.norainday = norainday;
    }

    public String getFirelevel() {
        return firelevel;
    }

    public void setFirelevel(String firelevel) {
        this.firelevel = firelevel;
    }

    public String getFfid() {
        return ffid;
    }

    public void setFfid(String ffid) {
        this.ffid = ffid;
    }
}
